package planner.dao;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import planner.domain.User;

public class SqlMapUserDAO extends SqlMapClientDaoSupport implements UserDAO {
	@Override
	public void insertUser(User user) {
		getSqlMapClientTemplate().insert("user.insertUser", user);
	}
	@Override
	public Boolean isUserValid(User user) {
		return (Boolean) getSqlMapClientTemplate().queryForObject("user.isUserValid", user);
	}
	@Override
	public Boolean isExistUser(User user) {
		return (Boolean) getSqlMapClientTemplate().queryForObject("user.isExistUser", user);
	}
	@Override
	public User getUser(User user) {
		return (User) getSqlMapClientTemplate().queryForObject("user.selectUser", user);
	}
	
}
